package cn.bon.emp.api.pojo.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author Lc_cl
 * @Date 2023/12/9
 * @Description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(description = "员工分页查询DTO")
public class EmpsDTO implements Serializable {

    @Schema(description = "当前页数")
    private Integer current;

    @Schema(description = "每页展示数量")
    private Integer pageSize;

    @Schema(description = "筛选姓名")
    private String empName;

    @Schema(description = "筛选岗位")
    private Long empJobId;

    @Schema(description = "筛选资质技能")
    private List<Long> skills;

    @Schema(description = "筛选更新时间开始")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime start;

    @Schema(description = "筛选更新时间结束")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime end;

    @Schema(description = "不传参默认全部  筛选状态: 0未备勤, 1备勤, 2全部")
    private Integer status = 2;

}
